package com.gmq.chapter02.synLockIn_2;

/**
 * Created by gmq on 2017/08/22.
 *
 * @version 1.0
 * @since 2017/08/22 17:02
 */
public class Main {
    public int i = 10;

    synchronized public void operateMainMethod() {
        try {
            i--;
            System.out.println("main print i=" + i);
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
